package com.own.business.question.entity.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.own.component.common.base.entity.po.BasePo;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * Question
 *
 * @author 陈学礼 （你是一段成熟的代码，要学会自己改bug）
 * @version 4.0.0
 * @date 2021/05/14 09:41:05
 * @since 4.0.0
 */
@Schema(description = "题目" + ConstantBeanSuffix.PO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "question")
public class Question extends BasePo {

    @Schema(description = "题目类型 1=单选 2=多选 3=判断 4=填空 5=简答")
    private Integer type;

    @Schema(description = "难度 1=入门 2=一般 3=优秀 4=一般面试 5=大企业面试")
    private Integer difficulty;

    @Schema(description = "权重 0-9")
    private Integer weight;

    @Schema(description = "是否不可用 1=不可用 0=可用")
    private Integer disabled;

    @Schema(description = "题干")
    private String name;

    @Schema(description = "题干的图片")
    private String nameImage;

    @Schema(description = "判断题，填空题，简答题答案类型答案为json列表数据")
    private String answer;

    @Schema(description = "简单讲解")
    private String explainSimple;

    @Schema(description = "详细讲解")
    private String explainDetail;

    @Schema(description = "总获取到的数量")
    private Integer total;

    @Schema(description = "正确率")
    private BigDecimal rightProbability;

    public interface Type {
        /**
         * 单项选择题
         */
        int SINGLE_CHOICE = 1;
        /**
         * 多项选择题
         */
        int MULTIPLE_CHOICE = 2;
        /**
         * 判断题
         */
        int TRUE_OR_FALSE = 3;
        /**
         * 填空题
         */
        int COMPLETION = 4;
        /**
         * 简答题
         */
        int SHORT_ANSWER = 5;
    }


}
